/*
 * local_var.c
 *
 *  Created on: Jul 17, 2021
 *      Author: dbw
 */

#include "common.h"
#include "examples.h"

#define LOG_TAG     "local_var"
#define LOG_LEVEL    LOG_LEVEL_VERBOSE
#include "logger.h"

#ifdef EXAMPLE_SHOW_STATIC_LOCAL

static char *get_add_formula(int a, int b)
{
    char buffer[32];
    sprintf(buffer, "%d + %d = %d", a, b, a + b);
    return buffer;
}

void static_var_example_run(void)
{
    LOG_I("formula: %s", get_add_formula(10, 20));
}

#endif /* EXAMPLE_SHOW_STATIC_LOCAL */
